'use strict';

function choose_divisible_integer(collection_a, collection_b) {
  let result=new Array();
  for(let i=0;i<collection_a.length;i++){
    for(let n=0;n<collection_b.length;n++){
      if(collection_a[i]%collection_b[n]==0){
        result.push(collection_a[i]);
      }
    }
  }
  return result;
}

module.exports = choose_divisible_integer;
